package com.res.share.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.res.share.model.ResReceive;
import com.res.share.mapper.ResReceiveMapper;
import com.res.share.model.dto.MessageModel;
import com.res.share.service.IResReceiveService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 接收者 服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-10-28
 */
@Service
public class ResReceiveServiceImpl extends ServiceImpl<ResReceiveMapper, ResReceive> implements IResReceiveService {

    @Override
    public IPage<MessageModel> findReceiveBoxList(Page<MessageModel> page, Integer userId) {
        return baseMapper.findReceiveBoxList(page,userId);
    }

    @Override
    public Integer findReceiveBoxNums(Integer userId) {
        return baseMapper.findReceiveBoxNums(userId);
    }

    @Override
    public void delreceiveMessageList(List<String> collect, Integer userId) {
        baseMapper.delreceiveMessageList(collect,userId);
    }

    @Override
    public Integer findNoReadMessageNums(Integer userId) {
        return baseMapper.findNoReadMessageNums(userId);
    }


}
